package com.taotao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.pojo.EUDataGridResult;
import com.taotao.pojo.TaotaoResult;
import com.taotao.service.ItemParamService;

@Controller
@RequestMapping("/item/param")
public class ItemParamController {
	@Autowired
	private  ItemParamService itemParamService;
	@RequestMapping("list")
	@ResponseBody
	public EUDataGridResult getItemParamList(Integer page, Integer rows){
		return itemParamService.getItemParamList(page, rows);
	}
	@RequestMapping("/query/itemcatid/{itemCatId}")
	@ResponseBody
	public TaotaoResult getItemParamById(@PathVariable Long itemCatId){
		return itemParamService.getItemParamById(itemCatId);
	}
	@RequestMapping("/save/{cid}")
	@ResponseBody
	public TaotaoResult saveItemParam(@PathVariable Long cid,String paramData){
		return itemParamService.saveItemParam(cid, paramData);
	}

}
